package com.zhou.base.components.bs.common.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * @author 18576666986
 * @description
 * @createDate 2023/4/18 16:35
 */

@AllArgsConstructor
@Getter
public enum PolicyChecklistRelationTypeEnum {

    /**
     * 关联的类型;1政策，2解读，3指南，4公示，5项目
     */
    POLICY(1, "政策"),
    POLICY_EXPLAIN(2, "解读"),
    PAYMENT_GUIDE(3, "指南"),
    PAYMENT_RESULT(4, "公示"),
    PROJECT(5, "项目"),
    ;

    private Integer value;
    private String text;

    /**
     * 判断参数合法性
     */
    public static boolean isValid(Integer value) {
        for (PolicyChecklistRelationTypeEnum relationType : PolicyChecklistRelationTypeEnum.values()) {
            if (relationType.getValue().equals(value)) {
                return true;
            }
        }
        return false;
    }
}
